package cn.fr4nk.crawler.task;

import java.sql.Timestamp;

public class FailedTask {

	private CrawlerTask task;
	private Timestamp failedTime;
	private String message;
	private volatile int retryCount = 0; // 失败后重试次数

	public CrawlerTask getTask() {
		return task;
	}

	public void setTask(CrawlerTask task) {
		this.task = task;
	}

	public Timestamp getFailedTime() {
		return failedTime;
	}

	public void setFailedTime(Timestamp failedTime) {
		this.failedTime = failedTime;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public int getRetryCount() {
		return retryCount;
	}

	public void setRetryCount(int retryCount) {
		this.retryCount = retryCount;
	}
	
	public void increaseRetryCount() {
		synchronized(this) {
			this.retryCount += 1;
		}
	}


}
